/**
 * 
 */
package com.klxedu.ms.gateway.security.session;

import java.util.Date;

import org.springframework.security.core.SpringSecurityCoreVersion;
import org.springframework.security.core.session.SessionInformation;

 /**
 * Title: CustomSessionInformation<br>
 * Description: 自定义SessionInfomation，增加了client属性，用于判断登录方式<br>
 * Copyright @ 2011~2017 Goldgov .All rights reserved.<br>
 * 
 * @author GuoR
 * @createDate 2017年6月7日
 */
 /**
 * Title: CustomSessionInformation<br>
 * Description: <br>
 * Copyright @ 2011~2018 Goldgov .All rights reserved.<br>
 * 
 * @author GuoR
 * @createDate 2018年7月18日
 */
public class CustomSessionInformation extends SessionInformation{
	private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;

	private String client;
	public CustomSessionInformation(Object principal, String sessionId,
			Date lastRequest) {
		super(principal, sessionId, lastRequest);
	}
	public CustomSessionInformation(Object principal, String sessionId,
			Date lastRequest,String client) {
		super(principal, sessionId, lastRequest);
		this.client = client;
		System.out.println(this);
	}
	public String getClient() {
		return client;
	}
	public void setClient(String client) {
		this.client = client;
	}
	@Override
	public String toString() {
		return "CustomSessionInformation [client=" + client + ", SessionId=" + getSessionId() + "]";
	}

}
